package io.gitee.kotle.demo.mvvm_demo.lottie

import android.content.Context
import android.graphics.Color
import android.os.Bundle
import android.widget.FrameLayout
import io.gitee.kotle.android.utils.startFragment
import io.gitee.kotle.base.library.BaseBindingFragment

import io.gitee.kotle.demo.databinding.FragmentLottieBinding

class LottieFragment : BaseBindingFragment<FragmentLottieBinding>() {
    companion object {
        fun start(context: Context) {
            context.startFragment<LottieFragment>()
        }
    }

    override fun initUi(savedInstanceState: Bundle?) {
        super.initUi(savedInstanceState)
        mBinding.root.setJsonAnimSize(100, 500)
        mBinding.root.setVirtualView(FrameLayout(requireContext()).also {
            it.setBackgroundColor(Color.GREEN)
        }, 60, 60, 20, 20)
    }

    override fun initObserverLiveData() {
        super.initObserverLiveData()
    }

    override fun initData() {
        super.initData()
    }
}